package org.nViron.nvOrganic;

//~--- non-JDK imports --------------------------------------------------------

import java.util.HashMap;
import java.util.Iterator;

import org.nViron.nvOrganism.nvOrganismMgr;
import org.nViron.nvParams.nvVizParamMgr.VIZPARAM;
import org.nViron.nvRender.nvRenderer;
import org.nViron.nvSim.nvSimulator;

/**
 * Manages, updates and renders all the organics
 * @author Roland Haring <p>
 * <script type="text/javascript" src="http://www.ohloh.net/p/376434/widgets/project_basic_stats.js"></script>
 */
public class nvOrganicsMgr extends nvOrganismMgr {
    public nvOrganicsMgr(nvSimulator simulator) {
        super(simulator);
    }

    public HashMap getOrganics() {
        return getObjects();
    }

    @Override
    public void render(nvRenderer renderer) {
        super.render(renderer);
    }

    @Override
    public void update(float timeStep) {
        super.update(timeStep);
    }

    public void updateVizValue(VIZPARAM param) {

        // iterate over all organic and call update
        for (Iterator i = getOrganics().values().iterator(); i.hasNext(); ) {
            nvOrganic organic = (nvOrganic)i.next();

            organic.updateVizValue(param);
        }
    }
}



